import request from '../../../utils/request.js'

//获得所有角色下拉框接口
export const listAllSysRole = () => {
    return request({
        url: `/sysrole/listAllSysRoleName`,
        method: 'get',
    })
}
//获得所有角色接口
export const getAllSysRole = (currentPage,pageSize) => {
    return request({
        url: `/sysrole/listAllSysRole/${currentPage}/${pageSize}`,
        method: 'get',
    })
}
//按角色名获得所有角色接口
export const getOneSysRole = (currentPage,pageSize,rolename) => {
    return request({
        url: `/sysrole/listAllSysRole/${currentPage}/${pageSize}/${rolename}`,
        method: 'get',
    })
}
//插入一个角色接口
export const InsertOneSysRole = (form) => {
    return request({
        url: `/sysrole/saveOneSysRole`,
        method: 'post',
		data:form
    })
}

//修改一个角色接口
export const EditOneSysRole = (form) => {
    return request({
        url: `/sysrole/editOneSysRole`,
        method: 'put',
		data:form
    })
}

//删除一个角色接口
export const deleteOneSysRole = (sysRoleId) => {
    return request({
        url: `/sysrole/deleteOneSysRole/${sysRoleId}`,
        method: 'delete',
    })
}
